Refinement Types for TypeScript

ثبت نشده
چکیده

1.1 Object Constraint System Our system leverages the idea introduced in the formall core of X10 [3] to extend a base constraint system C with a larger constraint system O (C), built on top of C. The original system C comprises formulas taken from a decidable SMT logic [2], including, for example, linear arithmetic constraints and uninterpreted predicates. The Object Constraint System O (C) introduces the constraints: • class (C), which it true for all classes C defined in the program; • x hasImm F, to denote that the immutable field F is accessable from variable x; • x hasMut G, to denote that the mutable field G is accessable from variable x; and • fields (x) = ♦F, G, to expose all fields available to x. Figure 1 shows the constraint system as ported from CFG [3]. We refer the reader to that work for details. The main differences are syntactic changes to account for our notion of strengthening. Also the FIELD rule accounts now for both immutable (as in CFJ) and mutable fields.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

TypeScript: The Next Generation

There is increasing interest in integrating dynamically and statically typed programming languages, as witnessed in industry by the development of the languages TypeScript and Dart, and in academia by the development of the theories of gradual types, hybrid types, and the blame calculus. The purpose of our project is to bring the academic and industrial developments together, applying theory to...

متن کامل

Concrete Types for TypeScript

TypeScript extends JavaScript with optional type annotations that are, by design, unsound and, that the TypeScript compiler discards as it emits code. This design point preserves programming idioms developers are familiar with, and allows them to leave their legacy code unchanged, while offering a measure of static error checking in parts of the program that have type annotations. We present an...

متن کامل

Mixed Messages: Measuring Conformance and Non-Interference in TypeScript

TypeScript participates in the recent trend among programming languages to support gradual typing. The DefinitelyTyped Repository for TypeScript supplies type definitions for over 2000 popular JavaScript libraries. However, there is no guarantee that implementations conform to their corresponding declarations. We present a practical evaluation of gradual typing for TypeScript. We have developed...

متن کامل

Understanding TypeScript

TypeScript is an extension of JavaScript intended to enable easier development of large-scale JavaScript applications. While every JavaScript program is a TypeScript program, TypeScript offers a module system, classes, interfaces, and a rich gradual type system. The intention is that TypeScript provides a smooth transition for JavaScript programmers—well-established JavaScript programming idiom...

متن کامل

Mixed Messages: Measuring Conformance and Non-Interference in TypeScript (Artifact)

In the paper Mixed Messages: Measuring Conformance and Non-Interference in TypeScript we present our experiences of evaluating gradual typing using our tool TypeScript TPD. The tool, based on the polymorphic blame calculus, monitors JavaScript libraries and TypeScript clients against the corresponding TypeScript definition. Our experiments yield two conclusions. First, TypeScript definitions ar...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016